<?php

namespace application\controller\cp;

use application\controller\cp\BaseController;

class AuthorController extends BaseController {

    public function __construct() {
        parent::__construct();
        $this->view->layout = '/layout/main';
    }

    /**
     * @comment(Đăng nhập hệ thống)
     * @mapping(value=cp/auth/signin.html)
     */
    public function singin() {
        $this->view->render('/user/signin');
    }

    /**
     * Đăng xuất
     * @mapping(value=cp/auth/signout.html)
     */
    public function signout() {
        $session = new \core\system\Session();
        $session->administrator = null;
        \core\system\HttpResponse::redirect($this->baseUrl . "cp/auth/signin.html");
    }

}
